#include "StdAfx.h"
#include "EmptyEffect.h"

EmptyEffect::EmptyEffect(IXAudio2SourceVoice* pVoice, WAVEFORMATEXTENSIBLE* pWfx):EffectXAPO(pVoice, pWfx)
{
	IID apoIid = {1};
	CoCreateGuid( (GUID*)(&apoIid) );
	XAPO_REGISTRATION_PROPERTIES	 rep = { apoIid, L"EmptyXAPO", L"2012", 1, 2,  XAPOBASE_DEFAULT_FLAG , 0, 1, 0, 1};
    
	emptyXAPO = new EmptyXAPO(&rep, (BYTE*)&p, sizeof(int), false, pWfx);
	emptyXAPO->Initialize(NULL, 0);

	pXAPO = (CXAPOBase*) emptyXAPO;


}

EmptyEffect::~EmptyEffect(void)
{
	delete emptyXAPO;
}

HRESULT EmptyEffect::apply(void)
{
	pSourceVoice->SetEffectParameters(GetEffectNumber(), &p, sizeof(int) );

	return S_OK;
}